.flex {
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -moz-flex;
    display: -ms-flexbox;
    display: flex;

    -webkit-box-pack: center;
    -moz-box-pack: center;
    -ms-flex-pack: center;
    -webkit-justify-content: center;
    justify-content: center;

    -webkit-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    -moz-align-items: center;
    align-items: center;
}

.flex .fitem {
    -webkit-box-flex: 1.0;
    -webkit-flex: 1 1 0;
    -moz-box-flex: 1.0;
    -moz-flex: 1 1 0;
    -ms-flex: 1 1 0;
    flex: 1 1 0;
}

.flex-auto .fitem {
    -webkit-box-flex: 1.0;
    -webkit-flex: 1 1 auto;
    -moz-box-flex: 1.0;
    -moz-flex: 1 1 auto;
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
}

.flex .auto-width {
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    -moz-box-flex: 1;
    -moz-flex: 1;
    -ms-flex: 1;
    flex: 1;
    width: 100%;
}

.flex-row {
    flex-direction: row;
}

.flex-col {
    flex-direction: column;
}

.flex-start {
    -webkit-box-pack: start;
    -moz-box-pack: start;
    -ms-flex-pack: flex-start;
    -webkit-justify-content: flex-start;
    justify-content: flex-start;
}

.flex-end {
    -webkit-box-pack: end;
    -moz-box-pack: end;
    -ms-flex-pack: flex-end;
    -webkit-justify-content: flex-end;
    justify-content: flex-end;
}

.flex-center {
    -webkit-box-pack: center;
    -moz-box-pack: center;
    -ms-flex-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
}

.flex-between {
    -webkit-box-pack: justify;
    -moz-box-pack: justify;
    -ms-flex-pack: space-between;
    -webkit-justify-content: space-between;
    justify-content: space-between;
}

.flex-around {
    -webkit-box-pack: space-around;
    -moz-box-pack: space-around;
    -ms-flex-pack: space-around;
    -webkit-justify-content: space-around;
    justify-content: space-around;
}

.flex-v-start {
    -webkit-box-align: start;
    -ms-flex-align: flex-start;
    -webkit-align-items: flex-start;
    -moz-align-items: flex-start;
    align-items: flex-start;
}

.flex-v-end {
    -webkit-box-align: end;
    -ms-flex-align: flex-end;
    -webkit-align-items: flex-end;
    -moz-align-items: flex-end;
    align-items: flex-end;
}

.flex-v-center {
    -webkit-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    -moz-align-items: center;
    align-items: center;
}

.flex-v-between {
    -webkit-box-align: space-between;
    -ms-flex-align: space-between;
    -webkit-align-items: space-between;
    -moz-align-items: space-between;
    align-items: space-between;
}

.flex-v-around {
    -webkit-box-align: space-around;
    -ms-flex-align: space-around;
    -webkit-align-items: space-around;
    -moz-align-items: space-around;
    align-items: space-around;
}

.flex-nowrap {
    flex-wrap: nowrap;
}


/* 栅格无缝隙，按照比例布局，总5或24栏 */
.x-grid-row {
    letter-spacing: -0.31em; /* Webkit: collapse white-space between units */
    *letter-spacing: normal; /* reset IE < 8 */
    *word-spacing: -0.43em; /* IE < 8: collapse white-space between units */
    text-rendering: optimizespeed; /* Webkit: fixes text-rendering: optimizeLegibility */
    /* font-family: FreeSans, Arimo, "Droid Sans", Helvetica, Arial, sans-serif; */
    display: -webkit-flex;
    -webkit-flex-flow: row wrap;

    /* IE10 uses display: flexbox */
    display: -ms-flexbox;
    -ms-flex-flow: row wrap;
}

/* Opera as of 12 on Windows needs word-spacing.
   The ".opera-only" selector is used to prevent actual prefocus styling
   and is not required in markup.
*/
.opera-only :-o-prefocus,
.x-grid-row {
    word-spacing: -0.43em;
}

.x-grid-u {
    display: inline-block;
    *display: inline; /* IE < 8: fake inline-block */
    zoom: 1;
    letter-spacing: normal;
    word-spacing: normal;
    vertical-align: top;
    text-rendering: auto;
}

.x-grid-1,
.x-grid-1-1,
.x-grid-1-2,
.x-grid-1-3,
.x-grid-2-3,
.x-grid-1-4,
.x-grid-3-4,
.x-grid-1-5,
.x-grid-2-5,
.x-grid-3-5,
.x-grid-4-5,
.x-grid-5-5,
.x-grid-1-6,
.x-grid-5-6,
.x-grid-1-8,
.x-grid-3-8,
.x-grid-5-8,
.x-grid-7-8,
.x-grid-1-12,
.x-grid-5-12,
.x-grid-7-12,
.x-grid-11-12,
.x-grid-1-24,
.x-grid-2-24,
.x-grid-3-24,
.x-grid-4-24,
.x-grid-5-24,
.x-grid-6-24,
.x-grid-7-24,
.x-grid-8-24,
.x-grid-9-24,
.x-grid-10-24,
.x-grid-11-24,
.x-grid-12-24,
.x-grid-13-24,
.x-grid-14-24,
.x-grid-15-24,
.x-grid-16-24,
.x-grid-17-24,
.x-grid-18-24,
.x-grid-19-24,
.x-grid-20-24,
.x-grid-21-24,
.x-grid-22-24,
.x-grid-23-24,
.x-grid-24-24 {
    display: inline-block;
    *display: inline;
    zoom: 1;
    letter-spacing: normal;
    word-spacing: normal;
    vertical-align: top;
    text-rendering: auto;
}

.x-grid-1-24 {
    width: 4.1667%;
    *width: 4.1357%;
}

.x-grid-1-12,
.x-grid-2-24 {
    width: 8.3333%;
    *width: 8.3023%;
}

.x-grid-1-8,
.x-grid-3-24 {
    width: 12.5000%;
    *width: 12.4690%;
}

.x-grid-1-6,
.x-grid-4-24 {
    width: 16.6667%;
    *width: 16.6357%;
}

.x-grid-1-5 {
    width: 20%;
    *width: 19.9690%;
}

.x-grid-5-24 {
    width: 20.8333%;
    *width: 20.8023%;
}

.x-grid-1-4,
.x-grid-6-24 {
    width: 25%;
    *width: 24.9690%;
}

.x-grid-7-24 {
    width: 29.1667%;
    *width: 29.1357%;
}

.x-grid-1-3,
.x-grid-8-24 {
    width: 33.3333%;
    *width: 33.3023%;
}

.x-grid-3-8,
.x-grid-9-24 {
    width: 37.5000%;
    *width: 37.4690%;
}

.x-grid-2-5 {
    width: 40%;
    *width: 39.9690%;
}

.x-grid-5-12,
.x-grid-10-24 {
    width: 41.6667%;
    *width: 41.6357%;
}

.x-grid-11-24 {
    width: 45.8333%;
    *width: 45.8023%;
}

.x-grid-1-2,
.x-grid-12-24 {
    width: 50%;
    *width: 49.9690%;
}

.x-grid-13-24 {
    width: 54.1667%;
    *width: 54.1357%;
}

.x-grid-7-12,
.x-grid-14-24 {
    width: 58.3333%;
    *width: 58.3023%;
}

.x-grid-3-5 {
    width: 60%;
    *width: 59.9690%;
}

.x-grid-5-8,
.x-grid-15-24 {
    width: 62.5000%;
    *width: 62.4690%;
}

.x-grid-2-3,
.x-grid-16-24 {
    width: 66.6667%;
    *width: 66.6357%;
}

.x-grid-17-24 {
    width: 70.8333%;
    *width: 70.8023%;
}

.x-grid-3-4,
.x-grid-18-24 {
    width: 75%;
    *width: 74.9690%;
}

.x-grid-19-24 {
    width: 79.1667%;
    *width: 79.1357%;
}

.x-grid-4-5 {
    width: 80%;
    *width: 79.9690%;
}

.x-grid-5-6,
.x-grid-20-24 {
    width: 83.3333%;
    *width: 83.3023%;
}

.x-grid-7-8,
.x-grid-21-24 {
    width: 87.5000%;
    *width: 87.4690%;
}

.x-grid-11-12,
.x-grid-22-24 {
    width: 91.6667%;
    *width: 91.6357%;
}

.x-grid-23-24 {
    width: 95.8333%;
    *width: 95.8023%;
}

.x-grid-1,
.x-grid-1-1,
.x-grid-5-5,
.x-grid-24-24 {
    width: 100%;
}

.x-grid {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -webkit-flex-direction: row;
    -ms-flex-direction: row;
    flex-direction: row;
    -webkit-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-box-align: stretch;
    -webkit-align-items: stretch;
    -ms-flex-align: stretch;
    align-items: stretch;
    padding: 0;
    margin: -1rem;
}

/** 布局空隙 **/
.x-gutter.x-grid-row {
    margin-left: -0.2rem;
    margin-right: -0.2rem;
}

.x-gutter *[class^="x-grid"]:not(.x-grid-row) {
    padding-left: 0.2rem;
    padding-right: 0.2rem;
}

.x-gutter-sm.x-grid-row {
    margin-left: -0.1rem;
    margin-right: -0.1rem;
}

.x-gutter-sm *[class^="x-grid"]:not(.x-grid-row) {
    padding-left: 0.1rem;
    padding-right: 0.1rem;
}

.x-gutter-lg.x-grid-row {
    margin-left: -0.3rem;
    margin-right: -0.3rem;
}

.x-gutter-lg *[class^="x-grid"]:not(.x-grid-row) {
    padding-left: 0.3rem;
    padding-right: 0.3rem;
}